package com.atguigu.test5;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @author 路飞
 * @date 2024/3/28 15:34
 * @description 12.    消除下面集合中重复元素？
 * List list = Arrays.asList(1,2,3,3,4,4,5,5,6,1,9,3,25,4);
 */
public class Exer12 {
    public static void main(String[] args) {
        List<Integer> list = Arrays.asList(1,2,3,3,4,4,5,5,6,1,9,3,25,4);
        Set<Integer> set = new HashSet<>(list);
        list = new ArrayList<>(set);
        System.out.println(list);
    }
}
